package com.bcxj.apiboss.controller;

import com.bcxj.apiboss.service.TravelUserService;
import com.bcxj.internalcommon.response.ResponseResult;
import com.bcxj.internalcommon.vo.TravelUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: TravelUserController
 * Package: com.bcxj.apiboss.controller
 * Description:
 *
 * @Author BCXJ
 * @Create 2025/5/6 11:24
 * @Version 1.0
 * @Since 1.0
 */
@RestController
@RequestMapping("traveluser")
@CrossOrigin
public class TravelUserController {

    @Autowired
    private TravelUserService travelUserService;

    /**
     * 分页查询用户数据
     * @param pageNo
     * @return
     */
    @GetMapping("list/{pageNo}")
    public ResponseResult getList(@PathVariable("pageNo") Integer pageNo) {
        return travelUserService.list(pageNo);
    }


    /**
     * 修改用户状态
     * @param id
     * @param state
     * @return
     */
    @GetMapping("state")
    public ResponseResult setState(Long id, Integer state) {
        return travelUserService.setState(id, state);
    }
}
